﻿Namespace Home
    Public Class Home
        Public Region As Rectangle

        Public BedRoom As New BedRoom
        Public Kitchen As New Kitchen
        Public DiningRoom As New DiningRoom

        Public Overrides Function ToString() As String
            Return PointToString(BedRoom.GridPosition) & "," & PointToString(Kitchen.GridPosition) & "," & PointToString(DiningRoom.GridPosition)
        End Function

        Public Sub FromString(ByVal Data() As String)
            BedRoom.GridPosition = New Point(Data(0), Data(1))
            Kitchen.GridPosition = New Point(Data(2), Data(3))
            DiningRoom.GridPosition = New Point(Data(4), Data(5))
        End Sub
    End Class

End Namespace